Skip to content

fix: add dynamic export to resolve static rendering error in /api/faqs route#2119

Open
shubsolos19 wants to merge 1 commit intomfts:mainfrom
shubsolos19:fix/faqs-static-rendering
Open

fix: add dynamic export to resolve static rendering error in /api/faqs route#2119
shubsolos19 wants to merge 1 commit intomfts:mainfrom
shubsolos19:fix/faqs-static-rendering

Conversation

@shubsolos19
Copy link

@shubsolos19 shubsolos19 commented Mar 20, 2026

Problem

Route /api/faqs was failing to build on Vercel with:

Route /api/faqs couldn't be rendered statically because it used nextUrl.searchParams

Fix

Added export const dynamic = "force-dynamic" to explicitly opt
this route out of static rendering since it relies on request-time
query parameters.

Fixes #1905

Summary by CodeRabbit

  • Chores
    • Updated API rendering configuration for improved performance and consistency.

@shubsolos19 shubsolos19 requested a review from mfts as a code owner March 20, 2026 15:07
@vercel
Copy link

vercel bot commented Mar 20, 2026

@shubsolos19 is attempting to deploy a commit to the mftsio Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1183547f-7657-457d-83c7-c8675d8930a5

📥 Commits

Reviewing files that changed from the base of the PR and between 44eb69d and b412335.

📒 Files selected for processing (1)
  • app/(ee)/api/faqs/route.ts

Walkthrough

Explicitly marked the /api/faqs API route as dynamically rendered by adding the export const dynamic = "force-dynamic"; directive. Inline comments were removed during this modification. Functional logic and validation behavior remain unchanged.

Changes

Cohort / File(s) Summary
API Route Configuration
app/(ee)/api/faqs/route.ts
Added export const dynamic = "force-dynamic"; to force dynamic rendering for the GET route. Removed inline comments from query parameter validation and visibilityFilters definition without altering functionality.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—adding a dynamic export to resolve the static rendering error in the /api/faqs route, which directly aligns with the changeset.
Linked Issues check ✅ Passed The pull request successfully addresses issue #1905 by adding the export const dynamic = "force-dynamic" declaration to force dynamic rendering, resolving the static rendering error caused by nextUrl.searchParams usage.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the dynamic rendering issue in the /api/faqs route; the removal of inline comments is a minor cleanup aligned with the PR objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use your project's `biome` configuration to improve the quality of JS/TS/CSS/JSON code reviews.

Add a configuration file to your project to customize how CodeRabbit runs biome.

@github-actions
Copy link

github-actions bot commented Mar 20, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@shubsolos19
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Route /api/faqs couldn't be rendered statically because it used nextUrl.searchParams

1 participant